package GUI;


import GUI.Tank;
import GUI.Steering;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Johannes
 */
public class GUI extends JFrame implements ActionListener {

    private Steering steering;
    private Tank tank;
    private JButton jbSteering = new JButton("Steering");
    private JButton jbTank =  new JButton("Tank");

    public GUI() {
        this.setName("Artificial Intelligence");
        this.setSize(700,600);

        this.add(jbSteering);
        this.add(jbTank);

		this.setLayout(null);
        this.setResizable(false);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setBackground(Color.WHITE);
        
		jbSteering.setBounds(200,200,100,100);
        jbTank.setBounds(400,200,100,100);
        jbSteering.addActionListener(this);
        jbTank.addActionListener(this);

		this.setVisible(true);
    }
    
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == jbSteering ) {
            steering = new Steering();
        }
        if (e.getSource() == jbTank) {
            tank = new Tank();
        }
    }
}
